/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

实例管理
API related to MONGODB instances

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKMongodb/MongodbApiModel.h>


@implementation MongodbCreateBackupRequest
-(id) initWithRegion:(NSString *)regionId
instanceId:(NSString*)instanceId
backupName:(NSString*)backupName { 
    self.regionId = regionId;
    self.instanceId = instanceId;
    self.backupName = backupName;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceId:(NSString*)instanceId
backupName:(NSString*)backupName { 
    self.regionId = regionId;
    self.version = version;
    self.instanceId = instanceId;
    self.backupName = backupName;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self backupName])
    {
        [result setValue:[self backupName] forKey:@"backupName"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.backupName = [dictionary objectForKey:@"backupName"];
    return self;
} 

@end
@implementation MongodbDeleteBackupRequest
-(id) initWithRegion:(NSString *)regionId
backupId:(NSString*)backupId { 
    self.regionId = regionId;
    self.backupId = backupId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
backupId:(NSString*)backupId { 
    self.regionId = regionId;
    self.version = version;
    self.backupId = backupId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self backupId])
    {
        [result setValue:[self backupId] forKey:@"backupId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupId = [dictionary objectForKey:@"backupId"];
    return self;
} 

@end
@implementation MongodbCreateBackupResult
-(id) initWithBackupId:(NSString*) backupId { 
    self.backupId = backupId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self backupId])
    {
        [result setValue:[self backupId] forKey:@"backupId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupId = [dictionary objectForKey:@"backupId"];
    return self;
} 

@end
@implementation MongodbBackupDownloadURLRequest
-(id) initWithRegion:(NSString *)regionId
backupId:(NSString*)backupId { 
    self.regionId = regionId;
    self.backupId = backupId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
backupId:(NSString*)backupId { 
    self.regionId = regionId;
    self.version = version;
    self.backupId = backupId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self backupId])
    {
        [result setValue:[self backupId] forKey:@"backupId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupId = [dictionary objectForKey:@"backupId"];
    return self;
} 

@end
@implementation MongodbDescribeSecurityIpsResult
-(id) initWithSecurityIps:(NSString*) securityIps { 
    self.securityIps = securityIps;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self securityIps])
    {
        [result setValue:[self securityIps] forKey:@"securityIps"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.securityIps = [dictionary objectForKey:@"securityIps"];
    return self;
} 

@end
@implementation MongodbDescribeSecurityIpsRequest
-(id) initWithRegion:(NSString *)regionId
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbModifySecurityIpsRequest
-(id) initWithRegion:(NSString *)regionId
modifyMode:(NSString*)modifyMode
securityIps:(NSString*)securityIps
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.modifyMode = modifyMode;
    self.securityIps = securityIps;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
modifyMode:(NSString*)modifyMode
securityIps:(NSString*)securityIps
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.modifyMode = modifyMode;
    self.securityIps = securityIps;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self modifyMode])
    {
        [result setValue:[self modifyMode] forKey:@"modifyMode"];
    }
    if([self securityIps])
    {
        [result setValue:[self securityIps] forKey:@"securityIps"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.modifyMode = [dictionary objectForKey:@"modifyMode"];
    self.securityIps = [dictionary objectForKey:@"securityIps"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbModifyInstanceSpecResult
-(id) initWithInstanceId:(NSString*) instanceId
        orderId:(NSString*)orderId { 
    self.instanceId = instanceId;               
    self.orderId = orderId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self orderId])
    {
        [result setValue:[self orderId] forKey:@"orderId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.orderId = [dictionary objectForKey:@"orderId"];
    return self;
} 

@end
@implementation MongodbDeleteInstanceRequest
-(id) initWithRegion:(NSString *)regionId
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbResetPasswordRequest
-(id) initWithRegion:(NSString *)regionId
accountPassword:(NSString*)accountPassword
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.accountPassword = accountPassword;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
accountPassword:(NSString*)accountPassword
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.accountPassword = accountPassword;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self accountPassword])
    {
        [result setValue:[self accountPassword] forKey:@"accountPassword"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.accountPassword = [dictionary objectForKey:@"accountPassword"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbCreateInstanceResult
-(id) initWithInstanceId:(NSString*) instanceId
        orderId:(NSString*)orderId { 
    self.instanceId = instanceId;               
    self.orderId = orderId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    if([self orderId])
    {
        [result setValue:[self orderId] forKey:@"orderId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    self.orderId = [dictionary objectForKey:@"orderId"];
    return self;
} 

@end
@implementation MongodbModifyInstanceSpecRequest
-(id) initWithRegion:(NSString *)regionId
instanceClass:(NSString*)instanceClass
instanceStorageGB:(NSNumber*)instanceStorageGB
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.instanceClass = instanceClass;
    self.instanceStorageGB = instanceStorageGB;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceClass:(NSString*)instanceClass
instanceStorageGB:(NSNumber*)instanceStorageGB
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.instanceClass = instanceClass;
    self.instanceStorageGB = instanceStorageGB;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceClass])
    {
        [result setValue:[self instanceClass] forKey:@"instanceClass"];
    }
    if([self instanceStorageGB])
    {
        [result setValue:[self instanceStorageGB] forKey:@"instanceStorageGB"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceClass = [dictionary objectForKey:@"instanceClass"];
    self.instanceStorageGB = [dictionary objectForKey:@"instanceStorageGB"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbModifyBackupPolicyResult
-(id) initWithPreferredBackupPeriod:(NSString*) preferredBackupPeriod
        preferredBackupWindow:(NSString*)preferredBackupWindow
        backupRetentionPeriod:(NSString*)backupRetentionPeriod { 
    self.preferredBackupPeriod = preferredBackupPeriod;               
    self.preferredBackupWindow = preferredBackupWindow;               
    self.backupRetentionPeriod = backupRetentionPeriod;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self preferredBackupPeriod])
    {
        [result setValue:[self preferredBackupPeriod] forKey:@"preferredBackupPeriod"];
    }
    if([self preferredBackupWindow])
    {
        [result setValue:[self preferredBackupWindow] forKey:@"preferredBackupWindow"];
    }
    if([self backupRetentionPeriod])
    {
        [result setValue:[self backupRetentionPeriod] forKey:@"backupRetentionPeriod"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.preferredBackupPeriod = [dictionary objectForKey:@"preferredBackupPeriod"];
    self.preferredBackupWindow = [dictionary objectForKey:@"preferredBackupWindow"];
    self.backupRetentionPeriod = [dictionary objectForKey:@"backupRetentionPeriod"];
    return self;
} 

@end
@implementation MongodbModifyInstanceNameRequest
-(id) initWithRegion:(NSString *)regionId
instanceName:(NSString*)instanceName
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.instanceName = instanceName;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceName:(NSString*)instanceName
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.instanceName = instanceName;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceName])
    {
        [result setValue:[self instanceName] forKey:@"instanceName"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceName = [dictionary objectForKey:@"instanceName"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbDescribeBackupPolicyResult
-(id) initWithPreferredBackupPeriod:(NSString*) preferredBackupPeriod
        preferredBackupWindow:(NSString*)preferredBackupWindow
        backupRetentionPeriod:(NSString*)backupRetentionPeriod { 
    self.preferredBackupPeriod = preferredBackupPeriod;               
    self.preferredBackupWindow = preferredBackupWindow;               
    self.backupRetentionPeriod = backupRetentionPeriod;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self preferredBackupPeriod])
    {
        [result setValue:[self preferredBackupPeriod] forKey:@"preferredBackupPeriod"];
    }
    if([self preferredBackupWindow])
    {
        [result setValue:[self preferredBackupWindow] forKey:@"preferredBackupWindow"];
    }
    if([self backupRetentionPeriod])
    {
        [result setValue:[self backupRetentionPeriod] forKey:@"backupRetentionPeriod"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.preferredBackupPeriod = [dictionary objectForKey:@"preferredBackupPeriod"];
    self.preferredBackupWindow = [dictionary objectForKey:@"preferredBackupWindow"];
    self.backupRetentionPeriod = [dictionary objectForKey:@"backupRetentionPeriod"];
    return self;
} 

@end
@implementation MongodbModifyBackupPolicyRequest
-(id) initWithRegion:(NSString *)regionId
preferredBackupTime:(NSString*)preferredBackupTime
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.preferredBackupTime = preferredBackupTime;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
preferredBackupTime:(NSString*)preferredBackupTime
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.preferredBackupTime = preferredBackupTime;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self preferredBackupTime])
    {
        [result setValue:[self preferredBackupTime] forKey:@"preferredBackupTime"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.preferredBackupTime = [dictionary objectForKey:@"preferredBackupTime"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbDescribeBackupPolicyRequest
-(id) initWithRegion:(NSString *)regionId
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbRestoreInstanceRequest
-(id) initWithRegion:(NSString *)regionId
backupId:(NSString*)backupId
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.backupId = backupId;
    self.instanceId = instanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
backupId:(NSString*)backupId
instanceId:(NSString*)instanceId { 
    self.regionId = regionId;
    self.version = version;
    self.backupId = backupId;
    self.instanceId = instanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self backupId])
    {
        [result setValue:[self backupId] forKey:@"backupId"];
    }
    if([self instanceId])
    {
        [result setValue:[self instanceId] forKey:@"instanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupId = [dictionary objectForKey:@"backupId"];
    self.instanceId = [dictionary objectForKey:@"instanceId"];
    return self;
} 

@end
@implementation MongodbDescribeBackupsResult
-(id) initWithBackups:(NSArray<Backup*>*) backups
        totalCount:(NSNumber*)totalCount
        pageNumber:(NSNumber*)pageNumber { 
    self.backups = backups;               
    self.totalCount = totalCount;               
    self.pageNumber = pageNumber;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self backups])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self backups] count]; i++) {
            Backup* item = [[self backups] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"backups"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* backupsArray = [dictionary objectForKey:@"backups"];
    if(backupsArray&&![backupsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [backupsArray count];i++)
        {
        Backup* item = [[Backup alloc]initWithDic:[backupsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.backups = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    return self;
} 

@end
@implementation MongodbDeleteBackupResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbDeleteBackupResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDeleteBackupResult* result = [[MongodbDeleteBackupResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDeleteBackupResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation MongodbDescribeBackupsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDescribeBackupsResult* result = [[MongodbDescribeBackupsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDescribeBackupsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbBackupDownloadURLResult
-(id) initWithBackupDownloadURL:(BackupDownloadURL*) backupDownloadURL { 
    self.backupDownloadURL = backupDownloadURL;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self backupDownloadURL])
    {
        [result setValue:[[self backupDownloadURL] dictionary]forKey:@"backupDownloadURL"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupDownloadURL = [[BackupDownloadURL alloc]initWithDic:[dictionary objectForKey:@"backupDownloadURL"]];
    return self;
} 

@end
  
@implementation MongodbBackupDownloadURLResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbBackupDownloadURLResult* result = [[MongodbBackupDownloadURLResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbBackupDownloadURLResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation MongodbCreateBackupResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbCreateBackupResult* result = [[MongodbCreateBackupResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbCreateBackupResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDescribeBackupsRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    return self;
} 

@end
@implementation MongodbModifySecurityIpsResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbDescribeSecurityIpsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDescribeSecurityIpsResult* result = [[MongodbDescribeSecurityIpsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDescribeSecurityIpsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation MongodbModifySecurityIpsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbModifySecurityIpsResult* result = [[MongodbModifySecurityIpsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbModifySecurityIpsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDescribeAvailableZonesResult
-(id) initWithAvailableZones:(NSArray<AvailableZones*>*) availableZones { 
    self.availableZones = availableZones;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self availableZones])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self availableZones] count]; i++) {
            AvailableZones* item = [[self availableZones] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"availableZones"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* availableZonesArray = [dictionary objectForKey:@"availableZones"];
    if(availableZonesArray&&![availableZonesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [availableZonesArray count];i++)
        {
        AvailableZones* item = [[AvailableZones alloc]initWithDic:[availableZonesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.availableZones = propertyArray;
    }
    return self;
} 

@end
  
@implementation MongodbDescribeAvailableZonesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDescribeAvailableZonesResult* result = [[MongodbDescribeAvailableZonesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDescribeAvailableZonesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation MongodbModifyInstanceSpecResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbModifyInstanceSpecResult* result = [[MongodbModifyInstanceSpecResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbModifyInstanceSpecResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbRestoreInstanceResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbRestoreInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbRestoreInstanceResult* result = [[MongodbRestoreInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbRestoreInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDescribeInstancesResult
-(id) initWithDbInstances:(NSArray<DBInstance*>*) dbInstances
        totalCount:(NSNumber*)totalCount
        pageNumber:(NSNumber*)pageNumber { 
    self.dbInstances = dbInstances;               
    self.totalCount = totalCount;               
    self.pageNumber = pageNumber;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self dbInstances])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self dbInstances] count]; i++) {
            DBInstance* item = [[self dbInstances] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"dbInstances"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* dbInstancesArray = [dictionary objectForKey:@"dbInstances"];
    if(dbInstancesArray&&![dbInstancesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [dbInstancesArray count];i++)
        {
        DBInstance* item = [[DBInstance alloc]initWithDic:[dbInstancesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.dbInstances = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    return self;
} 

@end
  
@implementation MongodbDescribeInstancesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDescribeInstancesResult* result = [[MongodbDescribeInstancesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDescribeInstancesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbResetPasswordResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbResetPasswordResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbResetPasswordResult* result = [[MongodbResetPasswordResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbResetPasswordResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDescribeFlavorsResult
-(id) initWithFlavors:(NSArray<Flavor*>*) flavors { 
    self.flavors = flavors;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self flavors])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self flavors] count]; i++) {
            Flavor* item = [[self flavors] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"flavors"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* flavorsArray = [dictionary objectForKey:@"flavors"];
    if(flavorsArray&&![flavorsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [flavorsArray count];i++)
        {
        Flavor* item = [[Flavor alloc]initWithDic:[flavorsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.flavors = propertyArray;
    }
    return self;
} 

@end
  
@implementation MongodbDescribeFlavorsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDescribeFlavorsResult* result = [[MongodbDescribeFlavorsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDescribeFlavorsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbCreateInstanceRequest
-(id) initWithRegion:(NSString *)regionId
instanceSpec:(DBInstanceSpec*)instanceSpec
chargeSpec:(ChargeSpec*)chargeSpec { 
    self.regionId = regionId;
    self.instanceSpec = instanceSpec;
    self.chargeSpec = chargeSpec;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceSpec:(DBInstanceSpec*)instanceSpec
chargeSpec:(ChargeSpec*)chargeSpec { 
    self.regionId = regionId;
    self.version = version;
    self.instanceSpec = instanceSpec;
    self.chargeSpec = chargeSpec;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceSpec])
    {
        [result setValue:[[self instanceSpec] dictionary]forKey:@"instanceSpec"];
    }
    if([self chargeSpec])
    {
        [result setValue:[[self chargeSpec] dictionary]forKey:@"chargeSpec"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.instanceSpec = [[DBInstanceSpec alloc]initWithDic:[dictionary objectForKey:@"instanceSpec"]];
    self.chargeSpec = [[ChargeSpec alloc]initWithDic:[dictionary objectForKey:@"chargeSpec"]];
    return self;
} 

@end
@implementation MongodbDescribeAvailableZonesRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbModifyBackupPolicyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbModifyBackupPolicyResult* result = [[MongodbModifyBackupPolicyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbModifyBackupPolicyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDescribeInstancesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters
tagFilters:(NSArray<TagFilter*>*)tagFilters
sorts:(NSArray<Sort*>*)sorts { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    self.tagFilters = tagFilters;
    self.sorts = sorts;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters
tagFilters:(NSArray<TagFilter*>*)tagFilters
sorts:(NSArray<Sort*>*)sorts { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    self.tagFilters = tagFilters;
    self.sorts = sorts;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self tagFilters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self tagFilters] count]; i++) {
            TagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    if([self sorts])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self sorts] count]; i++) {
            Sort* item = [[self sorts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"sorts"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
        TagFilter* item = [[TagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    NSArray* sortsArray = [dictionary objectForKey:@"sorts"];
    if(sortsArray&&![sortsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sortsArray count];i++)
        {
        Sort* item = [[Sort alloc]initWithDic:[sortsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.sorts = propertyArray;
    }
    return self;
} 

@end
@implementation MongodbModifyInstanceNameResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbModifyInstanceNameResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbModifyInstanceNameResult* result = [[MongodbModifyInstanceNameResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbModifyInstanceNameResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDeleteInstanceResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbDeleteInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDeleteInstanceResult* result = [[MongodbDeleteInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDeleteInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation MongodbDescribeBackupPolicyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbDescribeBackupPolicyResult* result = [[MongodbDescribeBackupPolicyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbDescribeBackupPolicyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation MongodbDescribeFlavorsRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation MongodbCreateInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
MongodbCreateInstanceResult* result = [[MongodbCreateInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(MongodbCreateInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
